﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Text;

namespace Query2Object
{
    public interface ISession:IDisposable
    {
        IDbContext Context { get; set; }
        IQuery GetQuery(IQueryable QueryParam);
        bool GetSingle(IQueryable Key);
        List<T> ExecuteList<T>(string Sql,IQueryable QueryParam);
        void ExecuteUpdate(string Sql, IQueryable QueryParam);
        int ExecuteCount(string Sql, IQueryable QueryParam);
        void Update(IQueryable QueryParam);
        void Create(IQueryable QueryParam);
        void Delete(IQueryable QueryParam);
        void OpenTranscation();
        void Commit();
        void RollBack();
        void Init(string ConnectionString);
        DataTable GetTable(string Sql, IQueryable QueryParam);
    }
}
